<?php
/**
* @version		$Id: default.php 9 2011-11-01 13:45:27Z netix.mail@gmail.com $
* @package		ALM Hotel Menager	
* @subpackage	com_almhm
* @author		ALM Studio
* @copyright	Copyright 2011 ALM Studio. All rights reserved
* @licence		Commercial
*/

defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_almhm&view=turist_infos'); ?>" method="post" name="adminForm">
	<fieldset id="filter-bar">	
		<div class="filter-search fltlft">
			<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('COM_ALMHM_FILTER_NASLOV'); ?></label>
			<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_ALMHM_FILTER_TEXT'); ?>" />
			<button type="submit"><?php echo JText::_('COM_ALMHM_FILTER_TIPKA'); ?></button>
			<button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('COM_ALMHM_FILTER_RESET'); ?></button>
		</div>
		<div class="filter-select fltrt">
			<select name="filter_mjesto_id" class="inputbox" onchange="this.form.submit()">
				<option value=""><?php echo JText::_('COM_ALMHM_LIST_FILTER_MJESTO');?></option>
				<?php echo JHtml::_('select.options', $this->mjesto, 'value', 'text', $this->state->get('filter.mjesto_id'));?>
			</select>		
		</div>
	</fieldset>
<div class="clr"></div>
<table class="adminlist">
	<thead>
		<tr>
			<th width="5">
				<?php echo JHtml::_('grid.sort',  'COM_ALMHM_LIST_ID', 'TinfoId', $listDirn, $listOrder); ?>
			</th>
			<th width="10">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHM_TURIST_INFO_NAZIV_NASLOV', 'TinfoNaziv', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHM_TURIST_INFO_MJESTO_NASLOV', 'TinfoMjesto', $listDirn, $listOrder); ?>
			</th>		
		</tr>
	</thead>
	<tfoot>	
		<tr>
			<td colspan="4">
				<?php echo $this->pagination->getListFooter(); ?></td>
		</tr>		
	</tfoot>
	<tbody>
		<?php foreach($this->items as $i => $item): 
?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
				<?php echo $item->TinfoId; ?>
			</td>
			<td>
				<?php echo JHtml::_('grid.id', $i, $item->TinfoId); ?>
			</td>
			<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almhm&task=turist_info.edit&TinfoId=' . $item->TinfoId); ?>">
				<strong><?php echo $item->TinfoNaziv; ?></strong>
				</a>
			</td>
			<td>
				<?php echo $item->TinfoMjesto; ?>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
